package com.huhu.controller;

import com.huhu.pojo.Person;
import com.huhu.service.ShowPerson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/")
public class PersonController {

    @Autowired
    private ShowPerson showPerson;


    @RequestMapping(value = "/show",method = RequestMethod.GET)
    public List<Person> showPerson(Person person){
        List<Person> persons = showPerson.showPerson();
        return persons;
    }


}